Skip to content

Instantly share code, notes, and snippets.

@nitaku
nitaku / README.md
Last active February 23, 2026 20:48
Canonical representation of unordered rooted trees

This example shows a canonical (non-ambiguous) representation of a randomly generated unordered rooted tree. Reload to generate a new one. This is an improvement of a previous example.

Unordered rooted trees are trees (with a root) in which sibling order is not defined. Visualizing such trees often involves showing siblings in arbitrary order.

Serializations of unordered trees are often ordered, therefore, they are not necessarily equal to each other even if they represent the same unordered tree. A particular case is that of randomly generated trees.

If such serializations are fed into a tree layout algorithm, it can yield different representations of the same unordered tree, which is undesirable.

We perform a total ordering of the tree, based solely on topological features, which constrains an order-preserving tree layout algorithm to yield a single representation (barring other layout parameters). The total ordering is used to sort the tree before passing it to th

@adrianhajdin
adrianhajdin / Customizer.jsx
Created March 31, 2023 12:33
Build and Deploy an AI-Powered 3D Website Using React | 2023 Three JS Course Tutorial for Beginners
{/* Download button */}
<button className='download-btn' onClick={downloadCanvasToImage}>
<img
src={download}
alt='download_image'
className='w-3/5 h-3/5 object-contain'
/>
</button>
@eros18123
eros18123 / Oclusao de tabela aleatoria
Created February 21, 2026 20:22
Oclusao de tabela aleatoria
# -*- coding: utf-8 -*-
import os
import json
import time
from aqt.qt import *
from aqt import gui_hooks
from aqt import mw
# Caminho para salvar as configurações
@Klerith
Klerith / pasos-node-typescript.md
Last active February 23, 2026 20:42
Configurar proyecto de Node con TypeScript

Pasos para usar Node con TypeScript con Nodemon

Más información - Docs Oficiales

  1. Instalar TypeScript y tipos de Node, como dependencia de desarrollo
npm i -D typescript @types/node
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
@emschwartz
emschwartz / README.md
Last active February 23, 2026 20:41
The Most Popular Blogs of Hacker News in 2025

This is an OPML version of the HN Popularity Contest results for 2025, for importing into RSS feed readers.

Plug: if you want to find content related to your interests from thousands of obscure blogs and noisy sources like HN Newest, check out Scour. It's a free, personalized content feed I work on where you define your interests in your own words and it ranks content based on how closely related it is to those topics.

@karpathy
karpathy / microgpt.py
Last active February 23, 2026 20:40
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@dwboutme
dwboutme / script.js
Created December 15, 2025 17:44 — forked from Eli-Zac/script.js
Blooket Cheats UserScript (by Gradyruan)
// ==UserScript==
// @name Blooket Gui
// @namespace http://tampermonkey.net/
// @version 1.5.5
// @author Gradyruan
// @license Mozilla Public License Version 2.0
// @description An Updated version of Minesraft2 and 05konzs' blooket cheats. Try not to abuse too many cheats at once or you'll crash. Press ctrl+e to hide. If there are any comments please provide feedback. Shoutout to Bobby Rindfleisch(Student)
// @match *://*.blooket.com/*
// @match *://blooket.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=blooket.com
@pfrazee
pfrazee / richtext.md
Last active February 23, 2026 20:36

Rich-text Array-formay Blocks and Spans

These documents are composed of blocks (structural content elements) which contain spans (text segments with rich formatting).

Examples

Example 1: A paragraph with mixed formatting

"Hello world, this is bold and this is a link."

@PARC6502
PARC6502 / OpenSourceBaas.md
Last active February 23, 2026 20:35
List of open source, self hosted BaaS - Backend as a service

Backend as a Service

Note on sizes: a lot of those might be inaccurate as there might be many microservices required aside from the core release/docker image. I haven't tested these recently so I'm not sure

Supabase - ~94.9K stars

  • Designed explicitly as an open source Firebase alternative
  • Typescript based
  • Docker support
  • Full Postgres database with Realtime subscriptions

PocketBase - ~54.5K stars

@sbyx
sbyx / notify-or-do-something-when-an-appliance-like-a-dishwasher-or-washing-machine-finishes.yaml
Last active February 23, 2026 20:34
Home Assistant Blueprint: Notify or do something when an appliance like a dishwasher or washing machine finishes
blueprint:
name: Appliance has finished
description: Do something when an appliance (like a washing machine or dishwasher)
has finished as detected by a power sensor.
domain: automation
input:
power_sensor:
name: Power Sensor
description: Power sensor entity (e.g. from a smart plug device).
selector: